<?php
declare(strict_types=1);

namespace app\common\command;

use app\admin\service\RuleNode;
use app\common\Attribute\CodeAnalyzer;
use ReflectionClass;
use ReflectionMethod;
use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;
use think\queue\Listener;
use think\facade\Db;
use think\facade\Request;
class Test extends Command
{

    protected function configure()
    {
        // 指令配置
        $this->setName('test:test1')
            ->setDescription('the app\common\command\test command');
    }

    protected function execute(Input $input, Output $output)
    {
        try {
            $RuleNode = RuleNode::make();
            $RuleNode->execute();
            if ($RuleNode->hasError()) {
                $Error = $RuleNode->getError();
                dump($Error);
            }
        } catch (\Exception $e) {
            dump($e->getMessage());
            dump($e->getTraceAsString());
        }
    }
}
